<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title th:text="${query} + ' - 搜索页'"></title>
    <link rel="stylesheet" href="/query.css">
</head>
<body>
    <div class="header">
        <div class="brand">
            <a href="/">搜索栏</a>
        </div>
        <form class="input-shell" method="get" action="/web">
            <input type="text" name="query" th:value="${query}">
            <button>搜索</button>
        </form>
    </div>

    <div class="result">
        <div class="result-item" th:each="doc : ${docList}">
            <a th:href="${doc.url}" th:text="${doc.title}"></a>
            <div class="desc" th:utext="${doc.desc}"></div>
            <div class="url" th:text="${doc.url}"></div>
        </div>
    </div>

    <div class="pagination">
        <a th:href="'/web?query=' + ${query} + '&page=' + ${page - 1}">上一页</a>
        <a th:href="'/web?query=' + ${query} + '&page=' + ${page + 1}">下一页</a>
    </div>

</body>
</html>